<?php
function cleanFile ($filename) { //clean up the file name

$filename = str_replace(" ","_",$filename);
$filename = str_replace("\\","",$filename);
$filename = str_replace("/","",$filename);
$filename = str_replace("|","_",$filename);
$filename = str_replace("'","",$filename);
$filename = str_replace("\"","",$filename);
$filename = str_replace("","",$filename);
$filename = str_replace("`","_",$filename);
$filename = str_replace("*","_",$filename);
$filename = str_replace("$","_",$filename);
$filename = str_replace("%","_",$filename);
$filename = str_replace("^","_",$filename);
$filename = str_replace("!","_",$filename);
$filename = str_replace("@","_",$filename);
$filename = str_replace("?","_",$filename);
$filename = str_replace(":","_",$filename);
$filename = str_replace(";","_",$filename);
$filename = str_replace(",","_",$filename);
$filename = str_replace("<","_",$filename);
$filename = str_replace(">","_",$filename);
$filename = str_replace("#","_",$filename);
$filename = str_replace("&","_",$filename);

$filename = strtolower($filename);
return $filename;

}
?>
